package servelet;

import java.math.BigDecimal;
import java.util.Random;
/**
 * 生成1000个站的经纬度
 * @author zhanghuanhuan
 *
 */
public class demo {
     public static void main(String[] args) {
    	 for (int i =1;i<1000;i++){
    		 double min = 116.211452;
             double max = 116.511090;
             double maxLog = 40.012934;
             double minLog = 39.817033;
             Random rand = new  Random();
              BigDecimal bd=new BigDecimal(Math.random() * (max - min)+min); 
              bd=bd.setScale(6, BigDecimal.ROUND_HALF_UP); 
              double a = bd.doubleValue();
              BigDecimal log = new BigDecimal(Math.random() * (maxLog - minLog)+minLog);
              BigDecimal b =log.setScale(6,BigDecimal.ROUND_HALF_UP);
              double c =b.doubleValue();
              System.out.println(c);
            System.out.println(a); 
    	 }
    	
	}
}
	